mirror of https://github.com/aseprite/aseprite.git
				
				
				
			Use new ScopedValue w/o old arg + C++17 class template argument deduction (CTAD)
This commit is contained in:
		
							parent
							
								
									d4d18c99be
								
							
						
					
					
						commit
						b28550faf5
					
				
							
								
								
									
										2
									
								
								laf
								
								
								
								
							
							
								
								
								
								
								
								
							
						
						
									
										2
									
								
								laf
								
								
								
								
							|  | @ -1 +1 @@ | ||||||
| Subproject commit cf1eec48af8ae0a9fb689e44cda2d6a125ce58d1 | Subproject commit 41476b78d001b82a72cc6556164bc20954d75636 | ||||||
|  | @ -188,7 +188,7 @@ private: | ||||||
|     if (!m_pendingChanges) |     if (!m_pendingChanges) | ||||||
|       return; |       return; | ||||||
| 
 | 
 | ||||||
|     base::ScopedValue<bool> switchSelf(m_selfUpdate, true, false); |     base::ScopedValue switchSelf(m_selfUpdate, true); | ||||||
| 
 | 
 | ||||||
|     m_timer.stop(); |     m_timer.stop(); | ||||||
| 
 | 
 | ||||||
|  | @ -308,7 +308,7 @@ private: | ||||||
| 
 | 
 | ||||||
|     m_timer.stop(); // Cancel current editions (just in case)
 |     m_timer.stop(); // Cancel current editions (just in case)
 | ||||||
| 
 | 
 | ||||||
|     base::ScopedValue<bool> switchSelf(m_selfUpdate, true, false); |     base::ScopedValue switchSelf(m_selfUpdate, true); | ||||||
| 
 | 
 | ||||||
|     int bgCount = 0; |     int bgCount = 0; | ||||||
|     int count = countCels(&bgCount); |     int count = countCels(&bgCount); | ||||||
|  |  | ||||||
|  | @ -762,7 +762,7 @@ private: | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   void onSearchChange() { |   void onSearchChange() { | ||||||
|     base::ScopedValue<bool> flag(m_searchChange, true, false); |     base::ScopedValue flag(m_searchChange, true); | ||||||
|     std::string searchText = search()->text(); |     std::string searchText = search()->text(); | ||||||
| 
 | 
 | ||||||
|     if (searchText.empty()) |     if (searchText.empty()) | ||||||
|  |  | ||||||
|  | @ -243,7 +243,7 @@ private: | ||||||
|     if (!m_layer) |     if (!m_layer) | ||||||
|       return; |       return; | ||||||
| 
 | 
 | ||||||
|     base::ScopedValue<bool> switchSelf(m_selfUpdate, true, false); |     base::ScopedValue switchSelf(m_selfUpdate, true); | ||||||
| 
 | 
 | ||||||
|     m_timer.stop(); |     m_timer.stop(); | ||||||
| 
 | 
 | ||||||
|  | @ -396,7 +396,7 @@ private: | ||||||
| 
 | 
 | ||||||
|     m_timer.stop(); // Cancel current editions (just in case)
 |     m_timer.stop(); // Cancel current editions (just in case)
 | ||||||
| 
 | 
 | ||||||
|     base::ScopedValue<bool> switchSelf(m_selfUpdate, true, false); |     base::ScopedValue switchSelf(m_selfUpdate, true); | ||||||
| 
 | 
 | ||||||
|     const bool tilemapVisibility = (m_layer && m_layer->isTilemap()); |     const bool tilemapVisibility = (m_layer && m_layer->isTilemap()); | ||||||
|     if (m_layer) { |     if (m_layer) { | ||||||
|  |  | ||||||
|  | @ -153,9 +153,7 @@ void Context::executeCommandFromMenuOrShortcut(Command* command, const Params& p | ||||||
|         command->id().c_str(), executingCommand->id().c_str()); |         command->id().c_str(), executingCommand->id().c_str()); | ||||||
|     return; |     return; | ||||||
|   } |   } | ||||||
|   base::ScopedValue<Command*> commandGuard(executingCommand, |   base::ScopedValue commandGuard(executingCommand, command); | ||||||
|                                            command, nullptr); |  | ||||||
| 
 |  | ||||||
|   executeCommand(command, params); |   executeCommand(command, params); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -105,7 +105,7 @@ bool DocUndo::canRedo() const | ||||||
| void DocUndo::undo() | void DocUndo::undo() | ||||||
| { | { | ||||||
|   ASSERT(!m_undoing); |   ASSERT(!m_undoing); | ||||||
|   base::ScopedValue undoing(m_undoing, true, false); |   base::ScopedValue undoing(m_undoing, true); | ||||||
|   const size_t oldSize = m_totalUndoSize; |   const size_t oldSize = m_totalUndoSize; | ||||||
|   { |   { | ||||||
|     const undo::UndoState* state = nextUndo(); |     const undo::UndoState* state = nextUndo(); | ||||||
|  | @ -127,7 +127,7 @@ void DocUndo::undo() | ||||||
| void DocUndo::redo() | void DocUndo::redo() | ||||||
| { | { | ||||||
|   ASSERT(!m_undoing); |   ASSERT(!m_undoing); | ||||||
|   base::ScopedValue undoing(m_undoing, true, false); |   base::ScopedValue undoing(m_undoing, true); | ||||||
|   const size_t oldSize = m_totalUndoSize; |   const size_t oldSize = m_totalUndoSize; | ||||||
|   { |   { | ||||||
|     const undo::UndoState* state = nextRedo(); |     const undo::UndoState* state = nextRedo(); | ||||||
|  | @ -279,7 +279,7 @@ Cmd* DocUndo::lastExecutedCmd() const | ||||||
| void DocUndo::moveToState(const undo::UndoState* state) | void DocUndo::moveToState(const undo::UndoState* state) | ||||||
| { | { | ||||||
|   ASSERT(!m_undoing); |   ASSERT(!m_undoing); | ||||||
|   base::ScopedValue undoing(m_undoing, true, false); |   base::ScopedValue undoing(m_undoing, true); | ||||||
| 
 | 
 | ||||||
|   m_undoHistory.moveTo(state); |   m_undoHistory.moveTo(state); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -62,7 +62,7 @@ void ResourcesLoader::reload() | ||||||
| 
 | 
 | ||||||
| void ResourcesLoader::threadLoadResources() | void ResourcesLoader::threadLoadResources() | ||||||
| { | { | ||||||
|   base::ScopedValue<bool> scoped(m_done, false, true); |   base::ScopedValue scoped(m_done, false, true); | ||||||
| 
 | 
 | ||||||
|   // Load resources from extensions
 |   // Load resources from extensions
 | ||||||
|   std::map<std::string, std::string> idAndPaths; |   std::map<std::string, std::string> idAndPaths; | ||||||
|  |  | ||||||
|  | @ -1029,7 +1029,7 @@ void ColorBar::onPaletteViewIndexChange(int index, ui::MouseButton button) | ||||||
| { | { | ||||||
|   COLOR_BAR_TRACE("ColorBar::onPaletteViewIndexChange(%d)\n", index); |   COLOR_BAR_TRACE("ColorBar::onPaletteViewIndexChange(%d)\n", index); | ||||||
| 
 | 
 | ||||||
|   base::ScopedValue<bool> lock(m_fromPalView, true, m_fromPalView); |   base::ScopedValue lock(m_fromPalView, true); | ||||||
| 
 | 
 | ||||||
|   app::Color color = app::Color::fromIndex(index); |   app::Color color = app::Color::fromIndex(index); | ||||||
| 
 | 
 | ||||||
|  | @ -1294,7 +1294,7 @@ void ColorBar::onFgColorChangeFromPreferences() | ||||||
|   if (m_fromPref) |   if (m_fromPref) | ||||||
|     return; |     return; | ||||||
| 
 | 
 | ||||||
|   base::ScopedValue<bool> sync(m_fromPref, true, false); |   base::ScopedValue sync(m_fromPref, true); | ||||||
|   setFgColor(Preferences::instance().colorBar.fgColor()); |   setFgColor(Preferences::instance().colorBar.fgColor()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -1312,7 +1312,7 @@ void ColorBar::onBgColorChangeFromPreferences() | ||||||
|     setFgColor(Preferences::instance().colorBar.bgColor()); |     setFgColor(Preferences::instance().colorBar.bgColor()); | ||||||
|   } |   } | ||||||
|   else { |   else { | ||||||
|     base::ScopedValue<bool> sync(m_fromPref, true, false); |     base::ScopedValue sync(m_fromPref, true); | ||||||
|     setBgColor(Preferences::instance().colorBar.bgColor()); |     setBgColor(Preferences::instance().colorBar.bgColor()); | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | @ -1322,7 +1322,7 @@ void ColorBar::onFgTileChangeFromPreferences() | ||||||
|   if (m_fromPref) |   if (m_fromPref) | ||||||
|     return; |     return; | ||||||
| 
 | 
 | ||||||
|   base::ScopedValue<bool> sync(m_fromPref, true, false); |   base::ScopedValue sync(m_fromPref, true); | ||||||
|   auto tile = Preferences::instance().colorBar.fgTile(); |   auto tile = Preferences::instance().colorBar.fgTile(); | ||||||
|   m_fgTile.setTile(tile); |   m_fgTile.setTile(tile); | ||||||
|   m_tilesView.selectColor(tile); |   m_tilesView.selectColor(tile); | ||||||
|  | @ -1333,7 +1333,7 @@ void ColorBar::onBgTileChangeFromPreferences() | ||||||
|   if (m_fromPref) |   if (m_fromPref) | ||||||
|     return; |     return; | ||||||
| 
 | 
 | ||||||
|   base::ScopedValue<bool> sync(m_fromPref, true, false); |   base::ScopedValue sync(m_fromPref, true); | ||||||
|   auto tile = Preferences::instance().colorBar.bgTile(); |   auto tile = Preferences::instance().colorBar.bgTile(); | ||||||
|   m_bgTile.setTile(tile); |   m_bgTile.setTile(tile); | ||||||
|   m_tilesView.selectColor(tile); |   m_tilesView.selectColor(tile); | ||||||
|  | @ -1372,10 +1372,10 @@ void ColorBar::onFgColorButtonChange(const app::Color& color) | ||||||
|   if (m_fromFgButton) |   if (m_fromFgButton) | ||||||
|     return; |     return; | ||||||
| 
 | 
 | ||||||
|   base::ScopedValue<bool> lock(m_fromFgButton, true, false); |   base::ScopedValue lock(m_fromFgButton, true); | ||||||
| 
 | 
 | ||||||
|   if (!m_fromPref) { |   if (!m_fromPref) { | ||||||
|     base::ScopedValue<bool> sync(m_fromPref, true, false); |     base::ScopedValue sync(m_fromPref, true); | ||||||
|     Preferences::instance().colorBar.fgColor(color); |     Preferences::instance().colorBar.fgColor(color); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  | @ -1390,13 +1390,13 @@ void ColorBar::onBgColorButtonChange(const app::Color& color) | ||||||
|   if (m_fromBgButton) |   if (m_fromBgButton) | ||||||
|     return; |     return; | ||||||
| 
 | 
 | ||||||
|   base::ScopedValue<bool> lock(m_fromBgButton, true, false); |   base::ScopedValue lock(m_fromBgButton, true); | ||||||
| 
 | 
 | ||||||
|   if (!m_fromPalView && !inEditMode()) |   if (!m_fromPalView && !inEditMode()) | ||||||
|     m_paletteView.deselect(); |     m_paletteView.deselect(); | ||||||
| 
 | 
 | ||||||
|   if (!m_fromPref) { |   if (!m_fromPref) { | ||||||
|     base::ScopedValue<bool> sync(m_fromPref, true, false); |     base::ScopedValue sync(m_fromPref, true); | ||||||
|     Preferences::instance().colorBar.bgColor(color); |     Preferences::instance().colorBar.bgColor(color); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  | @ -1716,7 +1716,7 @@ void ColorBar::onFixWarningClick(ColorButton* colorButton, ui::Button* warningIc | ||||||
|   if (inEditMode()) { |   if (inEditMode()) { | ||||||
|     const int newEntries = palette->size(); |     const int newEntries = palette->size(); | ||||||
|     if (oldEntries != newEntries) { |     if (oldEntries != newEntries) { | ||||||
|       base::ScopedValue<bool> sync(m_fromPref, true, m_fromPref); |       base::ScopedValue sync(m_fromPref, true); | ||||||
|       app::Color newIndex = app::Color::fromIndex(newEntries-1); |       app::Color newIndex = app::Color::fromIndex(newEntries-1); | ||||||
|       if (colorButton == &m_bgColor) |       if (colorButton == &m_bgColor) | ||||||
|         setBgColor(newIndex); |         setBgColor(newIndex); | ||||||
|  |  | ||||||
|  | @ -374,16 +374,14 @@ void ColorPopup::onMakeFixed() | ||||||
| 
 | 
 | ||||||
| void ColorPopup::onPaletteViewIndexChange(int index, ui::MouseButton button) | void ColorPopup::onPaletteViewIndexChange(int index, ui::MouseButton button) | ||||||
| { | { | ||||||
|   base::ScopedValue<bool> restore(m_insideChange, true, |   base::ScopedValue restore(m_insideChange, true); | ||||||
|                                   m_insideChange); |  | ||||||
| 
 | 
 | ||||||
|   setColorWithSignal(app::Color::fromIndex(index), ChangeType); |   setColorWithSignal(app::Color::fromIndex(index), ChangeType); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void ColorPopup::onColorSlidersChange(ColorSlidersChangeEvent& ev) | void ColorPopup::onColorSlidersChange(ColorSlidersChangeEvent& ev) | ||||||
| { | { | ||||||
|   base::ScopedValue<bool> restore(m_insideChange, true, |   base::ScopedValue restore(m_insideChange, true); | ||||||
|                                   m_insideChange); |  | ||||||
| 
 | 
 | ||||||
|   setColorWithSignal(ev.color(), DontChangeType); |   setColorWithSignal(ev.color(), DontChangeType); | ||||||
|   findBestfitIndex(ev.color()); |   findBestfitIndex(ev.color()); | ||||||
|  | @ -391,8 +389,7 @@ void ColorPopup::onColorSlidersChange(ColorSlidersChangeEvent& ev) | ||||||
| 
 | 
 | ||||||
| void ColorPopup::onColorHexEntryChange(const app::Color& color) | void ColorPopup::onColorHexEntryChange(const app::Color& color) | ||||||
| { | { | ||||||
|   base::ScopedValue<bool> restore(m_insideChange, true, |   base::ScopedValue restore(m_insideChange, true); | ||||||
|                                   m_insideChange); |  | ||||||
| 
 | 
 | ||||||
|   // Disable updating the hex entry so we don't override what the user
 |   // Disable updating the hex entry so we don't override what the user
 | ||||||
|   // is writting in the text field.
 |   // is writting in the text field.
 | ||||||
|  | @ -448,8 +445,7 @@ void ColorPopup::onSimpleColorClick() | ||||||
| 
 | 
 | ||||||
| void ColorPopup::onColorTypeClick() | void ColorPopup::onColorTypeClick() | ||||||
| { | { | ||||||
|   base::ScopedValue<bool> restore(m_insideChange, true, |   base::ScopedValue restore(m_insideChange, true); | ||||||
|                                   m_insideChange); |  | ||||||
| 
 | 
 | ||||||
|   if (m_simpleColors) |   if (m_simpleColors) | ||||||
|     m_simpleColors->deselect(); |     m_simpleColors->deselect(); | ||||||
|  | @ -492,8 +488,7 @@ void ColorPopup::onColorTypeClick() | ||||||
| 
 | 
 | ||||||
| void ColorPopup::onPaletteChange() | void ColorPopup::onPaletteChange() | ||||||
| { | { | ||||||
|   base::ScopedValue<bool> restore(m_insideChange, inEditMode(), |   base::ScopedValue restore(m_insideChange, inEditMode()); | ||||||
|                                   m_insideChange); |  | ||||||
| 
 | 
 | ||||||
|   setColor(getColor(), DontChangeType); |   setColor(getColor(), DontChangeType); | ||||||
|   invalidate(); |   invalidate(); | ||||||
|  |  | ||||||
|  | @ -332,7 +332,7 @@ bool ColorSelector::onProcessMessage(ui::Message* msg) | ||||||
| 
 | 
 | ||||||
|       app::Color color = getColorByPosition(pos); |       app::Color color = getColorByPosition(pos); | ||||||
|       if (color != app::Color::fromMask()) { |       if (color != app::Color::fromMask()) { | ||||||
|         base::ScopedValue<bool> switcher(m_lockColor, subColorPicked(), false); |         base::ScopedValue switcher(m_lockColor, subColorPicked()); | ||||||
| 
 | 
 | ||||||
|         StatusBar::instance()->showColor(0, color); |         StatusBar::instance()->showColor(0, color); | ||||||
|         if (hasCapture()) |         if (hasCapture()) | ||||||
|  |  | ||||||
|  | @ -450,7 +450,7 @@ void ColorSliders::syncRelHsvHslSliders() | ||||||
| 
 | 
 | ||||||
| void ColorSliders::onSliderChange(const Channel i) | void ColorSliders::onSliderChange(const Channel i) | ||||||
| { | { | ||||||
|   base::ScopedValue<int> lock(m_lockSlider, i, m_lockSlider); |   base::ScopedValue<int> lock(m_lockSlider, i); | ||||||
| 
 | 
 | ||||||
|   updateEntryText(i); |   updateEntryText(i); | ||||||
|   onControlChange(i); |   onControlChange(i); | ||||||
|  | @ -458,7 +458,7 @@ void ColorSliders::onSliderChange(const Channel i) | ||||||
| 
 | 
 | ||||||
| void ColorSliders::onEntryChange(const Channel i) | void ColorSliders::onEntryChange(const Channel i) | ||||||
| { | { | ||||||
|   base::ScopedValue<int> lock(m_lockEntry, i, m_lockEntry); |   base::ScopedValue<int> lock(m_lockEntry, i); | ||||||
| 
 | 
 | ||||||
|   // Update the slider related to the changed entry widget.
 |   // Update the slider related to the changed entry widget.
 | ||||||
|   int value = m_items[i].entry->textInt(); |   int value = m_items[i].entry->textInt(); | ||||||
|  |  | ||||||
|  | @ -88,7 +88,7 @@ DocumentPreferences& ConfigureTimelinePopup::docPref() | ||||||
| void ConfigureTimelinePopup::updateWidgetsFromCurrentSettings() | void ConfigureTimelinePopup::updateWidgetsFromCurrentSettings() | ||||||
| { | { | ||||||
|   DocumentPreferences& docPref = this->docPref(); |   DocumentPreferences& docPref = this->docPref(); | ||||||
|   base::ScopedValue<bool> lockUpdates(m_lockUpdates, true, false); |   base::ScopedValue lockUpdates(m_lockUpdates, true); | ||||||
| 
 | 
 | ||||||
|   auto position = Preferences::instance().general.timelinePosition(); |   auto position = Preferences::instance().general.timelinePosition(); | ||||||
|   int selItem = 2; |   int selItem = 2; | ||||||
|  |  | ||||||
|  | @ -257,7 +257,7 @@ private: | ||||||
|       return; |       return; | ||||||
| 
 | 
 | ||||||
|     IntEntry::onValueChange(); |     IntEntry::onValueChange(); | ||||||
|     base::ScopedValue<bool> lockFlag(g_updatingFromCode, true, g_updatingFromCode); |     base::ScopedValue lockFlag(g_updatingFromCode, true); | ||||||
| 
 | 
 | ||||||
|     Tool* tool = App::instance()->activeTool(); |     Tool* tool = App::instance()->activeTool(); | ||||||
|     Preferences::instance().tool(tool).brush.size(getValue()); |     Preferences::instance().tool(tool).brush.size(getValue()); | ||||||
|  | @ -278,7 +278,7 @@ protected: | ||||||
|       return; |       return; | ||||||
| 
 | 
 | ||||||
|     IntEntry::onValueChange(); |     IntEntry::onValueChange(); | ||||||
|     base::ScopedValue<bool> lockFlag(g_updatingFromCode, true, g_updatingFromCode); |     base::ScopedValue lockFlag(g_updatingFromCode, true); | ||||||
| 
 | 
 | ||||||
|     Tool* tool = App::instance()->activeTool(); |     Tool* tool = App::instance()->activeTool(); | ||||||
|     Preferences::instance().tool(tool).brush.angle(getValue()); |     Preferences::instance().tool(tool).brush.angle(getValue()); | ||||||
|  | @ -718,7 +718,7 @@ protected: | ||||||
|       return; |       return; | ||||||
| 
 | 
 | ||||||
|     IntEntry::onValueChange(); |     IntEntry::onValueChange(); | ||||||
|     base::ScopedValue<bool> lockFlag(g_updatingFromCode, true, g_updatingFromCode); |     base::ScopedValue lockFlag(g_updatingFromCode, true); | ||||||
| 
 | 
 | ||||||
|     int newValue = getValue(); |     int newValue = getValue(); | ||||||
|     Preferences& pref = Preferences::instance(); |     Preferences& pref = Preferences::instance(); | ||||||
|  | @ -1970,7 +1970,7 @@ void ContextBar::updateForTool(tools::Tool* tool) | ||||||
|   // ContextBar elements.
 |   // ContextBar elements.
 | ||||||
| 
 | 
 | ||||||
|   const bool oldUpdatingFromCode = g_updatingFromCode; |   const bool oldUpdatingFromCode = g_updatingFromCode; | ||||||
|   base::ScopedValue<bool> lockFlag(g_updatingFromCode, true, oldUpdatingFromCode); |   base::ScopedValue lockFlag(g_updatingFromCode, true); | ||||||
| 
 | 
 | ||||||
|   ToolPreferences* toolPref = nullptr; |   ToolPreferences* toolPref = nullptr; | ||||||
|   ToolPreferences::Brush* brushPref = nullptr; |   ToolPreferences::Brush* brushPref = nullptr; | ||||||
|  |  | ||||||
|  | @ -252,8 +252,7 @@ bool DrawingState::onMouseMove(Editor* editor, MouseMessage* msg) | ||||||
| 
 | 
 | ||||||
|   // Don't process onScrollChange() messages if autoScroll() changes
 |   // Don't process onScrollChange() messages if autoScroll() changes
 | ||||||
|   // the scroll.
 |   // the scroll.
 | ||||||
|   base::ScopedValue<bool> disableScroll(m_processScrollChange, |   base::ScopedValue disableScroll(m_processScrollChange, false); | ||||||
|                                         false, m_processScrollChange); |  | ||||||
| 
 | 
 | ||||||
|   // Update velocity sensor.
 |   // Update velocity sensor.
 | ||||||
|   m_velocity.updateWithDisplayPoint(msg->position()); |   m_velocity.updateWithDisplayPoint(msg->position()); | ||||||
|  |  | ||||||
|  | @ -778,7 +778,7 @@ bool Timeline::onProcessMessage(Message* msg) | ||||||
|           break; |           break; | ||||||
|         } |         } | ||||||
|         case PART_ROW_TEXT: { |         case PART_ROW_TEXT: { | ||||||
|           base::ScopedValue<bool> lock(m_fromTimeline, true, false); |           base::ScopedValue lock(m_fromTimeline, true); | ||||||
|           const layer_t old_layer = getLayerIndex(m_layer); |           const layer_t old_layer = getLayerIndex(m_layer); | ||||||
|           const bool selectLayer = (mouseMsg->left() || !isLayerActive(m_clk.layer)); |           const bool selectLayer = (mouseMsg->left() || !isLayerActive(m_clk.layer)); | ||||||
|           const bool selectLayerInCanvas = |           const bool selectLayerInCanvas = | ||||||
|  | @ -913,7 +913,7 @@ bool Timeline::onProcessMessage(Message* msg) | ||||||
|           break; |           break; | ||||||
| 
 | 
 | ||||||
|         case PART_CEL: { |         case PART_CEL: { | ||||||
|           base::ScopedValue<bool> lock(m_fromTimeline, true, false); |           base::ScopedValue lock(m_fromTimeline, true); | ||||||
|           const layer_t old_layer = getLayerIndex(m_layer); |           const layer_t old_layer = getLayerIndex(m_layer); | ||||||
|           const bool selectCel = (mouseMsg->left() |           const bool selectCel = (mouseMsg->left() | ||||||
|             || !isLayerActive(m_clk.layer) |             || !isLayerActive(m_clk.layer) | ||||||
|  |  | ||||||
|  | @ -30,7 +30,7 @@ UserDataView::UserDataView(Option<bool>& visibility) | ||||||
| 
 | 
 | ||||||
| void UserDataView::configureAndSet(const doc::UserData& userData, ui::Grid* parent) | void UserDataView::configureAndSet(const doc::UserData& userData, ui::Grid* parent) | ||||||
| { | { | ||||||
|   base::ScopedValue<bool> switchSelf(m_selfUpdate, true, m_selfUpdate); |   base::ScopedValue switchSelf(m_selfUpdate, true); | ||||||
| 
 | 
 | ||||||
|   if (!m_isConfigured) { |   if (!m_isConfigured) { | ||||||
|     // Find the correct hspan to add to an arbitrary grid column count:
 |     // Find the correct hspan to add to an arbitrary grid column count:
 | ||||||
|  |  | ||||||
|  | @ -55,7 +55,7 @@ void ZoomEntry::setZoom(const render::Zoom& zoom) | ||||||
| 
 | 
 | ||||||
| void ZoomEntry::onValueChange() | void ZoomEntry::onValueChange() | ||||||
| { | { | ||||||
|   base::ScopedValue<bool> lock(m_locked, true, m_locked); |   base::ScopedValue lock(m_locked, true); | ||||||
|   IntEntry::onValueChange(); |   IntEntry::onValueChange(); | ||||||
| 
 | 
 | ||||||
|   render::Zoom zoom = render::Zoom::fromLinearScale(getValue()); |   render::Zoom zoom = render::Zoom::fromLinearScale(getValue()); | ||||||
|  |  | ||||||
|  | @ -221,7 +221,7 @@ void IntEntry::closePopup() | ||||||
| 
 | 
 | ||||||
| void IntEntry::onChangeSlider() | void IntEntry::onChangeSlider() | ||||||
| { | { | ||||||
|   base::ScopedValue<bool> lockFlag(m_changeFromSlider, true, false); |   base::ScopedValue lockFlag(m_changeFromSlider, true); | ||||||
|   setValue(m_slider.getValue()); |   setValue(m_slider.getValue()); | ||||||
|   selectAllText(); |   selectAllText(); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -748,7 +748,7 @@ void Manager::handleWindowZOrder() | ||||||
|     (!window->isForeground()) && |     (!window->isForeground()) && | ||||||
|     // If the window is not already the top window of the manager.
 |     // If the window is not already the top window of the manager.
 | ||||||
|     (window != win_manager->getTopWindow())) { |     (window != win_manager->getTopWindow())) { | ||||||
|     base::ScopedValue<Widget*> scoped(m_lockedWindow, window, nullptr); |     base::ScopedValue<Widget*> scoped(m_lockedWindow, window); | ||||||
| 
 | 
 | ||||||
|     window->display()->handleWindowZOrder(window); |     window->display()->handleWindowZOrder(window); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -348,7 +348,7 @@ void Menu::showPopup(const gfx::Point& pos, | ||||||
|   // Set the owner menu item to nullptr temporarily in case that we
 |   // Set the owner menu item to nullptr temporarily in case that we
 | ||||||
|   // are re-using a menu from the root menu as popup menu (e.g. like
 |   // are re-using a menu from the root menu as popup menu (e.g. like
 | ||||||
|   // "animation_menu", that is used when right-cliking a Play button)
 |   // "animation_menu", that is used when right-cliking a Play button)
 | ||||||
|   base::ScopedValue<MenuItem*> restoreOwner(m_menuitem, nullptr, m_menuitem); |   base::ScopedValue<MenuItem*> restoreOwner(m_menuitem, nullptr); | ||||||
| 
 | 
 | ||||||
|   // Generally, when we call showPopup() the menu shouldn't contain a
 |   // Generally, when we call showPopup() the menu shouldn't contain a
 | ||||||
|   // parent menu-box, because we're filtering kMouseDownMessage to
 |   // parent menu-box, because we're filtering kMouseDownMessage to
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue