Commit 0bb46354 authored by Niklas Freund's avatar Niklas Freund Committed by Albert Astals Cid
Browse files

Workaround for minimum size not being kept when deactivating constants

BUG: 448760

In my previous resizing support merge request (!24), I made sure that any KCalc mode changes that happen at minimum window size result in the window resizing itself to the new minimum size. However, this turns out to not have worked in one specific case: Showing/Hiding the constants buttons.

Upon investigation of this issue, I noticed that `minimumSize()` isn't updating correctly after hiding of the buttons (and stays at the old minimumSize). Thus, the call to `resize(minimumSize())` doesn't work.
parent c206de1b
Pipeline #131638 passed with stage
in 39 seconds
......@@ -2281,6 +2281,9 @@ void KCalculator::slotConstantsShow(bool toggled)
forceResizeEvent();
QApplication::processEvents();
if (wasMinimumSize) {
// In this specific case, we need to invalidate the layout before resize
layout()->invalidate();
QApplication::processEvents();
resize(minimumSize());
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment