mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-30 18:16:31 +03:00
Fix unexpected tab bar scrolling while clicking on a tab.
This commit is contained in:
@@ -34,11 +34,11 @@ class EE_API UISlider : public UIWidget {
|
||||
|
||||
const Float& getValue() const;
|
||||
|
||||
virtual void setMinValue( const Float& MinVal );
|
||||
virtual void setMinValue( const Float& minVal );
|
||||
|
||||
const Float& getMinValue() const;
|
||||
|
||||
virtual void setMaxValue( const Float& MaxVal );
|
||||
virtual void setMaxValue( const Float& maxVal );
|
||||
|
||||
const Float& getMaxValue() const;
|
||||
|
||||
|
||||
@@ -369,26 +369,30 @@ const Float& UISlider::getValue() const {
|
||||
return mValue;
|
||||
}
|
||||
|
||||
void UISlider::setMinValue( const Float& MinVal ) {
|
||||
mMinValue = MinVal;
|
||||
void UISlider::setMinValue( const Float& minVal ) {
|
||||
if ( minVal != mMinValue ) {
|
||||
mMinValue = minVal;
|
||||
|
||||
if ( mValue < mMinValue )
|
||||
mValue = mMinValue;
|
||||
if ( mValue < mMinValue )
|
||||
mValue = mMinValue;
|
||||
|
||||
fixSliderPos();
|
||||
fixSliderPos();
|
||||
}
|
||||
}
|
||||
|
||||
const Float& UISlider::getMinValue() const {
|
||||
return mMinValue;
|
||||
}
|
||||
|
||||
void UISlider::setMaxValue( const Float& MaxVal ) {
|
||||
mMaxValue = MaxVal;
|
||||
void UISlider::setMaxValue( const Float& maxVal ) {
|
||||
if ( maxVal != mMaxValue ) {
|
||||
mMaxValue = maxVal;
|
||||
|
||||
if ( mValue > mMaxValue )
|
||||
mValue = mMaxValue;
|
||||
if ( mValue > mMaxValue )
|
||||
mValue = mMaxValue;
|
||||
|
||||
fixSliderPos();
|
||||
fixSliderPos();
|
||||
}
|
||||
}
|
||||
|
||||
const Float& UISlider::getMaxValue() const {
|
||||
|
||||
@@ -244,9 +244,9 @@ void App::updateEditorTabTitle( UICodeEditor* editor ) {
|
||||
if ( editor->getData() ) {
|
||||
UITab* tab = (UITab*)editor->getData();
|
||||
auto doc = editor->getDocumentRef();
|
||||
tab->setText( doc->getFilename() );
|
||||
std::string fileName( doc->getFilename() );
|
||||
|
||||
if ( tab->getText() != doc->getDefaultFileName() && !isUniqueTabTitle( tab ) ) {
|
||||
if ( fileName != doc->getDefaultFileName() && !isUniqueTabTitle( tab ) ) {
|
||||
auto tabsTitles = getUniqueNameForTabs( getTabWithSameTitle( tab ) );
|
||||
for ( auto [ntab, title] : tabsTitles ) {
|
||||
ntab->setText( title );
|
||||
@@ -255,6 +255,7 @@ void App::updateEditorTabTitle( UICodeEditor* editor ) {
|
||||
}
|
||||
} else if ( tab->getOwnedWidget()->isType( UI_TYPE_CODEEDITOR ) ) {
|
||||
tab->getOwnedWidget()->asType<UICodeEditor>()->removeClass( NOT_UNIQUE_FILENAME );
|
||||
tab->setText( fileName );
|
||||
}
|
||||
|
||||
bool dirty = doc->isDirty();
|
||||
|
||||
Reference in New Issue
Block a user