mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-14 13:15:14 +03:00
Fixed Node::removeEventListener.
Fixed UIWidget CSS setBorderWidth. Fixed a bug in the UIEditor. --HG-- branch : dev
This commit is contained in:
@@ -988,9 +988,9 @@ void Node::removeEventListener( const Uint32& CallbackId ) {
|
||||
EventsMap::iterator it;
|
||||
|
||||
for ( it = mEvents.begin(); it != mEvents.end(); ++it ) {
|
||||
std::map<Uint32, EventCallback> event = it->second;
|
||||
std::map<Uint32, EventCallback>& event = it->second;
|
||||
|
||||
if ( event.erase( CallbackId ) )
|
||||
if ( event.erase( CallbackId ) > 0 )
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1078,7 +1078,7 @@ bool UIWidget::applyProperty( const StyleSheetProperty& attribute ) {
|
||||
setBorderColor( attribute.asColor() );
|
||||
break;
|
||||
case PropertyId::BorderWidth:
|
||||
setBorderWidth( attribute.asDpDimensionI("1") );
|
||||
setBorderWidth( PixelDensity::dpToPxI( attribute.asDpDimensionI("1") ) );
|
||||
break;
|
||||
case PropertyId::BorderRadius:
|
||||
setBorderRadius( PixelDensity::dpToPxI( attribute.asDpDimensionUint() ));
|
||||
|
||||
@@ -256,6 +256,7 @@ static void loadLayout( std::string file ) {
|
||||
}
|
||||
|
||||
uiContainer->getContainer()->childsCloseAll();
|
||||
uiSceneNode->update(Time::Zero);
|
||||
|
||||
uiSceneNode->loadLayoutFromFile( file, uiContainer );
|
||||
|
||||
@@ -678,6 +679,7 @@ void closeProject() {
|
||||
currentLayout = "";
|
||||
currentStyleSheet = "";
|
||||
uiContainer->getContainer()->childsCloseAll();
|
||||
uiSceneNode->update(Time::Zero);
|
||||
uiSceneNode->setStyleSheet( CSS::StyleSheet() );
|
||||
|
||||
layouts.clear();
|
||||
|
||||
Reference in New Issue
Block a user