Fixed wrong page selection for Printer Setting after application run
This commit is contained in:
parent
6adb2e7aea
commit
4cd4d2c8b5
3 changed files with 9 additions and 4 deletions
|
@ -91,7 +91,9 @@ enum ConfigOptionType {
|
|||
enum ConfigOptionMode {
|
||||
comSimple = 0,
|
||||
comAdvanced,
|
||||
comExpert
|
||||
comExpert,
|
||||
|
||||
comUndef
|
||||
};
|
||||
|
||||
enum PrinterTechnology : unsigned char
|
||||
|
|
|
@ -729,10 +729,15 @@ void Tab::update_mode()
|
|||
m_mode_sizer->SetMode(m_mode);
|
||||
|
||||
update_visibility();
|
||||
|
||||
update_changed_tree_ui();
|
||||
}
|
||||
|
||||
void Tab::update_visibility()
|
||||
{
|
||||
if (m_mode == comUndef) // if mode isn't set for this moment
|
||||
m_mode = wxGetApp().get_mode();
|
||||
|
||||
Freeze(); // There is needed Freeze/Thaw to avoid a flashing after Show/Layout
|
||||
|
||||
for (auto page : m_pages)
|
||||
|
@ -741,8 +746,6 @@ void Tab::update_visibility()
|
|||
|
||||
Layout();
|
||||
Thaw();
|
||||
|
||||
update_changed_tree_ui();
|
||||
}
|
||||
|
||||
void Tab::msw_rescale()
|
||||
|
|
|
@ -218,7 +218,7 @@ protected:
|
|||
int m_em_unit;
|
||||
// To avoid actions with no-completed Tab
|
||||
bool m_complited { false };
|
||||
ConfigOptionMode m_mode = comSimple;
|
||||
ConfigOptionMode m_mode = comUndef;
|
||||
|
||||
public:
|
||||
PresetBundle* m_preset_bundle;
|
||||
|
|
Loading…
Reference in a new issue